/**
 * 
 */
package cz.cvut.fit.bugtrac.persistence;

import java.util.Collection;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import com.google.appengine.api.datastore.Key;

/**
 * @author Jarec
 * 
 */
@Entity
public class Graph extends AbstractBugTracEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Key id;

	@OneToMany(cascade = CascadeType.ALL)
	private Collection<Edge> edges;

	private Integer size;
	private Integer edgeSize;

	private Date created;

	/**
	 * @return the id
	 */
	public Key getId() {
		return id;
	}

	/**
	 * @return the edges
	 */
	public Collection<Edge> getEdges() {
		return edges;
	}

	/**
	 * @param edges
	 *            the edges to set
	 */
	public void setEdges(Collection<Edge> edges) {
		this.edges = edges;
	}

	/**
	 * @return the created
	 */
	public Date getCreated() {
		return created;
	}

	/**
	 * @param created
	 *            the created to set
	 */
	public void setCreated(Date created) {
		this.created = created;
	}

	/**
	 * @return the size
	 */
	public Integer getSize() {
		return size;
	}

	/**
	 * @param size
	 *            the size to set
	 */
	public void setSize(Integer size) {
		this.size = size;
	}

	/**
	 * @return the edgeSize
	 */
	public Integer getEdgeSize() {
		return edgeSize;
	}

	/**
	 * @param edgeSize
	 *            the edgeSize to set
	 */
	public void setEdgeSize(Integer edgeSize) {
		this.edgeSize = edgeSize;
	}

}
